Open
TheOpen
method should create or activate a window in which a frame of this part is the root frame.
ODID Open (in ODFrame frame);
frame
- A reference to a frame that is being opened into a window, or
kODNULL
if the frame does not exist.- return value
- The ID associated with the window.
DISCUSSION
Your part is always responsible for creating windows in which it is the root part, even when OpenDoc is opening a saved draft. Your part'sOpen
method is called in these circumstances:
- When this part is initially created from stationery--meaning that it has no previously stored frame or window information--OpenDoc calls this method and passes
kODNULL
for theframe
parameter.- When this part is an embedded part whose frame is selected, and the user chooses the Open Selection command from the Document menu, this part's containing part calls this part's
Open
method and passes a reference to the selected frame in theframe
parameter.- When this part is the root part of a document being opened, OpenDoc calls this method and passes a reference to the root frame in the
frame
parameter. The root frame is annotated with a storage unit containing window information; if the root frame has no window information, this part should instead open a default window.
OVERRIDING
When you subclassODPart
, you must override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.EXCEPTIONS
kODErrInvalidFrame
- The specified frame is not a display frame of this part.
SEE ALSO
TheODID
type (page 899).
TheODWindowState::Internalize
method (page 862).
For more information on opening windows, see the chapter on windows and menus in theOpenDoc Programmer's Guide for the MacOS .
"The Open Method" on page 47 in OpenDoc Cookbook.
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"The Open Method of Your Part Editor" on page 228 in OpenDoc Programmer's Guide.
"Open Selection" on page 246 in OpenDoc Programmer's Guide.
"Installing a Patch" on page 455 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help